#include <stdio.h>

int method(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return method(b, a % b);
    }
}

int main() {
    int num1, num2;

    printf("请输入两个整数：\n");
    scanf("%d %d", &num1, &num2);

    int result = method(num1, num2);

    printf("最大公约数是: %d\n", result);

    return 0;
}